Hi,
try this.
select case when ctc is null or ctc='' then '0' else ctc end from salary where name ='XYZ'
Note: Null is a varchar kind of value while 0 is int , that's why its giving error when you are writing
"case when ctc is null then 0 else ctc end"
so use it Like this
"case when ctc is null then '0' else ctc end"
Hope it will help you.. :)