请大家帮助写个查询语句

table1

id  column1  column2  column3  column4  column5 ……

table2

id name

这是两张表,table1中的column1到column(n)的值都来自table2.id。现在想查询table1,但是想把column1到column(n)都换成对应的name值。

请大家帮个忙 !

select
(select name from table2 where id=t.column1) column1,
(select name from table2 where id=t.column2) column2,
(select name from table2 where id=t.column3) column3,
...
(select name from table2 where id=t.column(n)) column(n)
from table1 t

这里假设 table2 id是唯一的