If you want to concat multiple values, but exclude the ones that are null, you can use the CONCAT_WS
function.
The first argument is the delimiter and all the following values will be concated if they are not null.
SELECT CONCAT_WS(',', value1, value2, value3)
Example:
value1: Null
value2: 2
value3: 3
value4: Null
SELECT CONCAT_WS(',', value1, value2, value3, value4);
---
2,3