Q:

Query to use columns and differentiate the date within the result set

I have a requirement to use the columns inside a specific result set and differentiate the date.
I have the table Employees with employee names, Status, Date of Joining, Date of Changing Status.
My table is given below.
Employee_Name   Status   Date_of_Status   Date_of_Promotion
-----------------------------------------------------------
Prasanth        Active   01/10/2007        NULL
Kiran           Promoted NULL              01/03/2012
Ravi            Promoted NULL              04/05/2012

Finally, I need to get the result as 
Employee_Name   Promoted   Active
----------------------------------
Prasanth        NULL       01/10/2007 
Kiran           01/03/2012 NULL
Ravi            04/05/2012 NULL

Is this possible in Oracle?
If so, could you please let me know how do I do it?

A:

We can use CASE 
   Select Employee_Name ,
   Case when Status = 'Promoted' 
   then Date_of_Promotion else NULL end as Promoted,
   Case when Status ='Active' then 
   then Date_of_Status else NULL   end as Active
   From
   EmployeeTable

