How about:
SELECT COALESCE(sum(num), 0) AS val FROM tab WHERE descr LIKE "%greetings%";
The COALESCE function basically says “return the first parameter, unless it’s null in which case return the second parameter” – It’s quite handy in these scenarios.