Albo użyj
SELECT IF(field1 IS NULL or field1 = '', 'empty', field1) as field1
from tablename
lub
SELECT case when field1 IS NULL or field1 = ''
then 'empty'
else field1
end as field1
from tablename
Jeśli chcesz tylko sprawdzić null a nie dla pustych ciągów, możesz również użyć ifnull() lub coalesce(field1, 'empty') . Ale to nie jest odpowiednie dla pustych ciągów.