If you are on open ground stand still and make some noise. Raise your hand to stop the rushing lion. This is purely a game of bluff and if it works withdraw slowly.
If there is a tree, climb it. Lions are comparatively poor climbers and if you are lucky you will be able to wait it out in the very upper branches.
If it is possible to escape by swimming a river use that option. Unlike tigers or jaguars lions do not care for swimming except when absolutely necessary so that would be an option.
Most likely however is that you would die and get eaten whatever the scenario and your last moments can then be spent regreting the decision which put you in such a ridiculous situation.