Если порядок тегов REFID / REFID2 может измениться, вы можете использовать это:
WITH d AS (
SELECT 'REFID:12345, REFID2:67890' id_list FROM DUAL
UNION ALL
SELECT 'REFID2:111, REFID:222' FROM DUAL
)
SELECT id_list
,CASE WHEN INSTR(refid,',') > 0
THEN SUBSTR(refid, 1, INSTR(refid,',')-1)
ELSE refid
END AS refid
,CASE WHEN INSTR(refid2,',') > 0
THEN SUBSTR(refid2, 1, INSTR(refid2,',')-1)
ELSE refid2
END AS refid2
FROM (
SELECT id_list
,SUBSTR(id_list
,INSTR(id_list,'REFID:')+6
) AS refid
,SUBSTR(id_list
,INSTR(id_list,'REFID2:')+7
) AS refid2
FROM d
);