Using SUBSTR and CONCAT to get the required Result
if the 'DEP2' does not exist it has to use 'DEP'


Typical NVL/COALESCE situation, not something that should be handled with string functions.

SELECT DEP, DEP2, COALESCE(DEP2, DEP) CENTRE
FROM DEPARTMENT