TSQL hierarchical tree access through CTE