You need a subquery to remove the duplicates, something like;
select id, listagg(name, ',') within group (order by name) as names
from (
select id, name1 as name from your_table
union
select id, name2 as name from your_table
union
select id, name3 as name from your_table
)
group by id
The union will automatically remove duplicates from the combined result set (if you didn't want it to, you'd use union all).
As a demo with a CTE representing your table:
with your_table(id, name1, name2, name3) as (
select 1, 'a', 'b', 'c' from dual
union all select 1, 'c', 'd', 'a' from dual
union all select 2, 'd', 'e', 'a' from dual
union all select 2, 'c', 'd', 'b' from dual
)
select id, listagg(name, ',') within group (order by name) as names
from (
select id, name1 as name from your_table
union
select id, name2 as name from your_table
union
select id, name3 as name from your_table
)
group by id;
ID NAMES
-- --------------------
1 a,b,c,d
2 a,b,c,d,e
You could also have the subquery selecting all three columns and then pivoting them into rows, but with only three this might be simpler.