Hi,
In Sql server have below mentioned table.
Name Age Karthik 26
Kumar 18
Mala 16
Keyan 28
I want output like this below,
Name Status Karthik Adult
Kumar Major
Mala Minor
Keyan Adult
I write a query below mentioned,
select Name,
case
when Age=26 then 'Adult'
when Age=18 then 'Major'
when Age=16 then 'Minor'
when Age=28 then 'Adult'
End As [Status] From tbName
But In future I add one or more records in that table, Then How can we proceed this without alter the query.
Thanks in advance
KarthiK.K
Karthik