please let me know if this works --
Code:
select L2.CompanyPID
, L2.company
from yourtable as L2
where L2.langID = 2
union all
select CompanyPID
, company
from yourtable as L1
left outer
join yourtable as L2
on L1.CompanyPID
= L2.CompanyPID
and L2.langID = 2
where L1.langID = 1
and L2.CompanyPID is null
union all
select CompanyPID
, company
from yourtable as L3
left outer
join yourtable as L2
on L3.CompanyPID
= L2.CompanyPID
and L2.langID = 2
left outer
join yourtable as L1
on L3.CompanyPID
= L1.CompanyPID
and L1.langID = 1
where L3.langID = 3
and L2.CompanyPID is null
and L1.CompanyPID is null