I think an earlier poster had it "right":
1) If the creature knows it is in a field of spikes (possible only with Perception, per the spell description), then it knows movement will harm it. Command fails - perhaps defaulting to "Grovel".
2) Otherwise, the creature attempts to flee, as...