1st way using ISNULL:-Select person_id,IsNull(Middle_Name,'NA') as name from person_master where MIDDLE_NAME is null;
2nd way using Coalesce:-Select person_id,Coalesce(Middle_name,'NA') as name from person_master where MIDDLE_NAME is null;
3rd way using CASE:-Select p.person_id,case when p.MIDDLE_NAME is null then 'NA' else p.MIDDLE_NAME end as name from person_master p where p.MIDDLE_NAME is null;