dnd 5e – Does a turned creature have to move away from the caster even if it means it will take damage?

If, suppose, a fiend is on the edge of a cliff and an Oath of the Watchers paladin casts Abjure the Extraplanar on it. Would it have to jump of it? Or would it take the Dodge action since it cant keep “walking” away from the paladin.

The cliff example is a little extreme. But you could also suppose that the fiend is on a jagged mountain and the floor is considered difficult terrain such that a creature walking over it takes damage. Would the fiend placed in this situation walk over the difficult terrain to take the most efficient path to get away from the paladin, or would it try to sidestep the danger?