SELECT * FROM mytable WHERE column1 LIKE '%word1%' OR column1 LIKE '%word2%' OR column1 LIKE '%word3%'
IF (SELECT COUNT(*) FROM foos WHERE bar = 'baz') > 0