Wildcats win NBL Cup thriller over Phoenix