Return the first non-null value in a list:
SELECT COALESCE(NULL, NULL, NULL, 'W3Schools.com', NULL, 'Example.com');
-- output: W3Schools.com
/* Return The First Non Null Value*/
SELECT Column_Name, COALESCE (Col1, Col2, Col3,...) AS Alias_Name FROM Table_Name
For Example
/*
ID First_Name Middle _Name Last_Name
1 Sam null null
2 null John null
3 null null smith
*/
SELECT ID, COALESCE (First_Name, Middle_Name, Last_Name) AS Name
FROM tblCOSTOMER
/*
Output
ID Name
1 Sam
2 John
3 smith
*/
SELECT COALESCE(NULL, NULL, NULL, 'HELLO WORLD', NULL, 'Example.com');
RESULT
'Hello World' --> First value not null