When @se_withsiddhi='Y' I am getting all the data but when @se_withsiddhi=null want to retrieve only null values but not getting.
declare @se_withsiddhi varchar
set @se_withsiddhi = 'Y'
select JD.Job_No,
INV.Bill_No,
inv.BilledToSE
from invoice INV
left outer join Job_Details JD on JD.Job_ID = INV.Job_ID
where JD.Job_No is not null
and INV.Bill_No is not null
AND isnull(INV.BilledToSE,'') = case @se_withsiddhi
when 'Y' then isnull(INV.BilledToSE,'')
when Null then ''
else null
end`enter code here`