Obviously you need to be able to pass the equivalent of a a two-column table to your stored procedure. There are two (or may be more) different approaches to doing this. See a discussion on this blog (not all of them may be applicable to you because it discusses sharing data between stored procedures). You MAY be able to use the XML method or table valued parameters.
If you want to use the XML method, compose the key-value pairs into an XML fragment, for example, like the one shown below:
</kvpairs>Now pass that to a stored procedure and use it like this:
c1.value('k','int') AS [Key],
c1.value('v','varchar(64)') AS [Value]
CROSS APPLY c.nodes('kv') T1(c1)
) t2 ON t2.[Key] = t1.key1 AND t2.[Value] = t2.key2