select A.id,
B.name as Name1,
C.name as Name2,
D.name as Name3
from (select * from table2 where id='11111') A left join table1 B on A.id1=B.id
left join table1 C on A.id2=B.id
left join table1 D on A.id3=B.id
B.name as Name1,
C.name as Name2,
D.name as Name3
from (select * from table2 where id='11111') A left join table1 B on A.id1=B.id
left join table1 C on A.id2=B.id
left join table1 D on A.id3=B.id