Problem statement ::
I have one database table named as category which contain column name as categoryIds, below is the sample data into categoryIDs column
categoryIds = '17,34,400,12'
Now I have written the SQL query below to find out category
declare @search as varchar
set @search='40'
select * from category where categoryIds like '%' + @search + '%'
above query return result which is wrong as categoryIDs does not contain 40 category