select positionChild,(select Remark from Freqs a join Contents b on a.ID=b.senior where b.ID=c.id) as senior,
(select Remark from Freqs a join Contents b on a.ID=b.middle where b.ID=c.id ) as middle,
(select Remark from Freqs a join Contents b on a.ID=b.general where b.ID=c.id ) as general
from Contents c
原文:http://www.cnblogs.com/xihong2014/p/4097803.html