how are you passing value to the list...
if you pass values to list in this manner list(2,5) then you can create a procedure for this...
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/