The exact error I was facing was, 0A000: set-returning functions are not allowed in CASE.
While investigating, found that the syntax works in Postgres version 9.6 but not in 11.
To overcome the problem, I had a work around of adding one more CTE (Common Table Expression) as below which solved my problem.
cte as
(
select string_to_array("StartDate", ',') as "S1_StartDate",
string_to_array("EndDate", ',') as "S1_EndDate",
case when "FlatDisc" is null then '{0}' when "FlatDisc" ='' then '{0}' else string_to_array("FlatDisc", ',') end as "S1_FlatDisc"
from TABLE_XYZ
)
,cte2 as
(
select unnest("S1_StartDate") as "S_StartDate",
unnest("S1_EndDate") as "S_EndDate",
unnest("S1_FlatDisc") as "S_FlatDisc"
from cte
)
select * from cte2