select decode (cc,'aa','aaa',cc) as aa from t

解决方案 »

  1.   

    select 
          t.name,
          case when 條件 then (返回結果) end as filed1,
          case when 條件 then (返回結果) end as filed2,
          case when 條件 then (返回結果) end as filed3,
          case when 條件 then (返回結果) end as filed4
    from Table1 t
      

  2.   

    select decode (cc,'aa','aaa',cc) as aa from t
      

  3.   

    跟sql server中的case語句一樣,可以對多種情況判斷