I have a table with several fields and one field having 3 Comma Separated Values
Column 1 Column 2 1 1,2,3 2 2,3,4 3 6,7,8
You can use FIND_IN_SET():
FIND_IN_SET()
SELECT column1 FROM table WHERE FIND_IN_SET('2', column2) != 0
The IN operator is basically a shortcut for lots of ORs:
IN
WHERE column2 = IN ('a', 'b', 'c')
gives the same result as
WHERE (column2 = 'a' OR column2 = 'b' OR column2 = 'c')