You have two choices. Build the SQL statement dynamically and set the entire list by appending the items on. This can get ugly. Second, Put the values in a temp table and then use "where x in (select y from temptable)".
It also depends upon from where you are getting your dynamic list from....
If you can get it from the DB itself you can very well use a sub-query
If you are getting it from application OR if you are getting it from application + DB then you can very well try out dynamic SQL statements. (All that you do in this case is store the SQL statement in a VARCHAR and then execute the same)