Select * from myTableI think you just need to put it in your where clause:
if myID != 0 Then
where UsersID in (myID)
but as others said - if myid contains multiple values, you need to process it differently depending on whether it's one string or a collection etc.
select * from myTable where myid != 0 -- myid doesn't have to be a column of the table to be included in the where clause and usersID in (myID);