In general, should follow ABC, especially for sensored motor. But sometime if need to reverse the motor for certain car configuration, and the ESC does not have a reverse parameter, can swap any 2.
For non-sensored, does not matter which wire sequence in general.