How can I use this mysql query in sql server?
incorrect syntax error near keyword ‘in’
select count(1) as total_record
from sms_allocation
left join sms_api_definition on sms_allocation.sms_api_definition_id = sms_api_definition.sms_api_definition_id
where if((‘1’ = 1 || ‘4,26,28,31,32,33,37,41,53,56,58,62,63,66,71,72,73,75,76,77,81’ = 81 || ‘4,26,28,31,32,33,37,41,53,56,58,62,63,66,71,72,73,75,76,77,81’ = 82),
if(‘0’!=‘0’,reseller_id in (
select reseller_id
from sms_allocation
where reseller_id in (0)),reseller_id in (
select reseller_id
from sms_allocation)
), reseller_id in (
select reseller_id
from sms_allocation
where reseller_id in (0)) and sms_allocate_to=‘Company’);