select case 明细 when 1 then ' '+内容 else 内容 end  from t

解决方案 »

  1.   

    select 内容=(case 明细 when 1 then ' ' else 内容 end)
           ,明细=(case 明细 when 0 then ' ' else 内容 end)
    from 表A
      

  2.   

    看似两列、又似一列:我再少一列:
    select 内容=(case 明细 when 1 then ' '+内容 else 内容 end)  from 表A
      

  3.   

    create table tb( 内容 nvarchar(3000), 明细 int)
    insert into tb
    select '01',0
    union
    select '02',0
    union
    select '03',1select 内容 = (case 明细 when 1 then ' ' + 内容 else 内容 end)
    from tb
    drop table tb
    --结果
    01
    02
     03