This could be one solution
with tab as (select distinct category title, null parent from test
union all
select title, category from test)
select lpad(' ', (level * 2 - 1), '-' ) || title as title
from tab
start with parent is null
connect by prior title = parent;