I'm assuming this is a practical question, not an academic one, but I'll try to bend it in the favor of theory.
Firstoff, "ground" aka GND aka Vss in electronics context, is a common/return. In mains electricity, we call that "neutral". In mains, "ground" Equipment Safety Ground which never, never, never flows current except during a fault condition.
Ground is always green, yellow-green or bare wire, except in the old Soviet Bloc. That means identifying Ground is so crazy-easy that there's no point talking about any other method. What's more, we can quickly eliminate that wire, so we only have to measure amongst 4 wires (6 measurements) instead of 5 (10 measurements).
To touch theory, AC mains power comes off a transformer, so it is isolated, and practical transformer leakage could cause it to float at all sorts of crazy voltages. This is hard on insulation. So to keep the conductors from rattling/floating, one conductor is bonded to safety earthing inside the main service panel, in this one location only. They choose the one "in the middle", i.e. so other conductors will be the lowest possible voltage compared to earth. (to make those conductors safer).
Since it's bonded to ground in the main panel, it will be quite near ground (just a few volts above it), and so it's given the name: Neutral.
So, if you can't identify the wires, you measure the voltage between each wire.
The highest voltage on the list will appear on 3 wire pairs: AB, BC, and AC. Those (A, B, C) are your phases. The voltages from A, B, C to the other wires will be lower, and if the ratio is 1:sqrt(3), that proves it! Here's an example:
B-G 277V B-O 480V B-W 277V B-Y 480V
G-O 277V G-W 0V G-Y 277V
O-W 277V O-Y 480V
The three highest are BO BY OY. So B, O and Y are our phases.
The two that remain are neutral and ground. How do we distinguish these? Consider the lowly torque wrench.
This beam-type never needs calibration. The big beam bends as you apply torque, but the little beam doesn't - it stays at zero. Safety ground will also stay at zero. Neutral is flowing current, so it will "bend" owing to voltage drop.
So we throw a wire across the shop to allow us to compare to a known ground, and then we throw loads on and off around the building. Ground shouldn't budge at all. Neutral will float up and down some fraction of a volt, or even 2-3 volts, as the loads in the building change.