| ID | Home phone | cell phone |
| 123 | 44012057952 | 8495795805 |
| 34 | 5792794704 | |
| 245 | | 7079480489 |
Hello folk's,
I have a table with 3 fields customer id , home phone,cell_phone.
My requirement is using CASE statement i need to get the phone number of customer_id based on below.
if both exists then prefer home phone
if home phone does not exists and cell phone exsist then give cell number
if cell phone does not exists and home phone exists then give home phone,
Criteria is client needs any of phone number irrespective of cell phone or home phone
| ID | Home phone | cell phone |
| 123 | 44012057952 | 8495795805 |
| 34 | 5792794704 | |
| 245 | | 7079480489 |
Thanks,
Shv