You can use string.find(haystack, needle) to see if your text exists within another text.
For example:
_CasterClasses = 'DRU,CLR,SHM,MAG,WIZ,NEC,ENC'
if string.find(_CasterClasses, mq.TLO.Me.Class.ShortName()) then
mq.cmd("/echo match")
else
mq.cmd("/echo no match")
end
string.find will...