Case in Select Statement

I have an SQL statement that has a CASE from SELECT and I just can’t get it right. Can you guys show me an example of CASE where the cases are the conditions and the results are from the cases. For example:

     Select xxx, yyy
     case : desc case when bbb then 'blackberry';
     when sss then 'samsung';
     from (select ???? .....

where the results show

 name                         age       handphone
xxx1                         yyy1      blackberry
xxx2                         yyy2      blackberry

Leave a Comment