sql query/relation problem

hello all I have come across a unique situation i cant figure out how to resolve.

i have table here:


|id|data|

|1|cat-dog-bird|

|2|dog-cat-bird|

|3|cat-man-dog|


how can i make it so

if query is like select * where data == cat-dog-bird or dog-cat-bird or bird-dog-cat

the record ids returned would be 1,and 2 but not id 3.

you see what i mean like a regex separated by a delimiter,

this would probably be more efficient to do in the database eh? anyhow im lost.

SELECT * FROM table WHERE FIND_IN_SET(data,‘cat-dog-bird,dog-cat-bird,bird-dog-cat’) > 0;

The above will only work if that ‘data’ column is a SET.

It works with varchar columns too.

Simply if the column is a SET, the function is optimized.