I have a table with a varchar column categoryIds. It contains some IDs separated by commas, for example:
varchar
categoryIds
id categoryIds -----
SELECT * FROM myTable WHERE (',' + RTRIM(categoryIds) + ',') LIKE '%,' + @stringId + ',%'
Here @stringId is your text to be searched. In this way you can avoid unnecessary multiple where conditions
Kind Regards, Raghu.M.