SELECT * FROM dbo.Blog
DROP TABLE #TEP_TABLE
select Blogsecret,
max(case BlogKey when '1' then '2' else BlogKey end) '答案A',
max(case BlogKey when '1' then '2' else BlogKey end) '答案B',
max(case BlogKey when '1' THEN '2' else BlogKey end) '答案C'
INTO #TEP_TABLE
from Blog
WHERE Blogsecret=1
group by Blogsecret
SELECT 答案A+'&'+答案B+'&'+答案C AS 最终答案 FROM #TEP_TABLE