Select
T1.id,
A.FilePath as [MusicFilePath],
B.FilePath as [BgFilePath],
C.FilePath as [BorderFilePath]
From
T1
Inner Join T2 as A on A.FileID = T1.musicFileID
Inner Join T2 as B on B.FileID = T1.musicFileID
Inner Join T2 as C on C.FileID = T1.musicFileID
T1.id,
A.FilePath as [MusicFilePath],
B.FilePath as [BgFilePath],
C.FilePath as [BorderFilePath]
From
T1
Inner Join T2 as A on A.FileID = T1.musicFileID
Inner Join T2 as B on B.FileID = T1.musicFileID
Inner Join T2 as C on C.FileID = T1.musicFileID
select a.aid as id
,b.filepath as musicFilePath,
c.filepath as bgFilePath,
d.filepath as borderFilePath
from T1 a,t2 b,t2 c,t2 d
where b.fileid=a.musicFileid
and c.fileid=a.bgFileid
and d.fileid=a.borderFileid