if i had to do it, i would use two queue to skill group node.
first one queues the call to ABC and success/failure path of that node to another queue to skill group node for "XYZ".
and again there are many ways like have a LAA node pointing to queue to skill group ABC and the failure path pointing to queue to skill group node having both ABC and XYZ skill.