Amit,
You can use an array to pass comma delimited values, then, with a simple loop asign them to a string and execute your query dynamic.

Let me know if you need some example.