Check condition in sql server

Something like this perhaps:

select a1.id
      ,a1.name
      ,isnull(a2.[check],a1.[check]) as [check]
  from emp as a1
       left outer join emp as a2
                    on a2.id=a1.id
                   and a1.[check] in (2,5)
                   and a2.[check] in (2,5)
                   and a2.[check]<>a1.[check]
 where a2.id is null
    or (a1.[check]=5
   and  a2.[check]=2
       )