не должно быть слишком сложным:
SQL> with test (col1, col2) as
2 (select 'B1', 'A1' from dual union all
3 select 'B2', 'A1' from dual union all
4 select 'B3', 'A1' from dual union all
5 select 'C1', 'B1' from dual union all
6 select 'C2', 'B1' from dual union all
7 select 'D1', 'C1' from dual union all
8 select 'D2', 'C1' from dual union all
9 select 'D3', 'C1' from dual union all
10 select 'Z1', 'K1' from dual union all
11 select 'Z1', 'K2' from dual
12 )
13 select col1
14 from test
15 start with col2 = 'A1'
16 connect by prior col1 = col2
17 order by col1;
CO
--
B1
B2
B3
C1
C2
D1
D2
D3
8 rows selected.
SQL>