Does this query look correct? I am trying to use Case in this select query below. I want to get where Source is either 'billings' or 'billings and terrritory = '1' then it should be 'Resales'
if Source = 'ERP' or 'IMT' and territory = 'Direct' then it should returns as 'Direct'.
when Source = 'billings' or Source = 'billingsAdj' and Territory = '1' then 'Resales'
when Source = 'ERP' OR Source = 'IMT' and Territory = 'Direct' then 'Direct'
end as Sales