Link to home
Start Free TrialLog in
Avatar of minglelinch
minglelinch

asked on

A T-SQL CASE like question

I need to write a query in the store procedure.

My table columns:
id,
...
model1,
model2,
model3,
...

Earch row has one of the three has a value and the rest two are null.
eg. if a row has a value on model1 column, model2 and model3 have null values.

I want to write query select some columns, and for model property column, only pick up the model column that has a value.

How can I write it? Thanks.
ASKER CERTIFIED SOLUTION
Avatar of dsine
dsine
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of minglelinch
minglelinch

ASKER

Thanks.