SELECT s.id,c1.name,c2.name,c3.name FROM dbo.student s, code c1, code c2, code c3
WHERE s.code1=c1.id
AND s.code1=c1.id
AND s.code2=c2.id
AND s.code3=c3.id
SELECT s.id,c1.name,c2.name,c3.name FROM dbo.student s, code c1, code c2, code c3
WHERE s.code1=c1.id
AND s.code1=c1.id
AND s.code2=c2.id
AND s.code3=c3.id