1-- Returns 1 if exists, 0 else
2SELECT EXISTS(SELECT 1 FROM my_table WHERE text LIKE '%something%');
3
4SELECT
5 CASE
6 WHEN EXISTS(SELECT 1 FROM my_table WHERE text LIKE '%something%') = 1 THEN
7 'It exists'
8 ELSE 'Does not exist'
9 END;