I have a table in SQL Server hat has:
FirstName, LastName, MiddleName, CellNumber, HomeNumber
John Smith M 111-111-1111, 222-222-2222
The person can have both CellNumber and HomeNumber or can have CellNumber but no HomeNumber or can have HomeNumber and no CellNumber.
How do i write a query that will always return CellNumber if exists and HomeNumber only if CellNumber is NULL or blank.
SQL query to produce following results:
FirstName, LastName, MiddleName, NumberToUse, PhoneType
John Smith M 111-111-1111 CellNumber
Thanks for your help.