test a SET data type field
This may help you get closer to a solution:

You can &amp; and | (that's 'and' and 'or') SET values.  Unfortunately you get an integer, the bits of which represent the result of the bit-wise operation.

The result of &amp; will be non-zero if some fields match.

The result of &amp; can be fed into BIT_COUNT() to see how many things match.

(a &amp; b) != 0


should give you 1 for the item being in the set, zero if not.