SQL, если пуст, тогда
SELECT COALESCE(NULLIF(SomeColumn,''), ReplacementColumn)
FROM SomeTable
Lonely Lark
SELECT COALESCE(NULLIF(SomeColumn,''), ReplacementColumn)
FROM SomeTable
IF ISNULL(@param) OR @param = '' THEN doSomething...