Вы можете использовать условное агрегирование:
select
owner,
table_name,
listagg(case when attribute_id = 0 then column_name end, ',')
within group(order by column_name) oib_col,
listagg(case when attribute_id = 1 then column_name end, ',')
within group(order by column_name) jmbg_col,
listagg(case when attribute_id = 2 then column_name end, ',')
within group(order by column_name) first_name_col,
listagg(case when attribute_id = 3 then column_name end, ',')
within group(order by column_name) last_name_col
from mytable
group by owner, table_name
order by owner, table_name
Демонстрация на DB Fiddle :
OWNER | TABLE_NAME | OIB_COL | JMBG_COL | FIRST_NAME_COL | LAST_NAME_COL
:------- | :--------- | :------------- | :---------------- | :---------------------- | :--------------------
CC_CASES | CC_CONTACT | X_MB_OIB,X_OIB | X_JMBG,X_X_JMBG_2 | FIRST_NAME | LAST_NAME
USER | CC_CASES | X_OIB,X_OIB_2 | X_JMBG,X_JMBG_2 | FIRST_NAME,FIRST_NAME_2 | LAST_NAME,LAST_NAME_2