Something like this might work for you:
When enemy is hit
.. Set enemy.destinationX to enemy.X-100 (away from palyer or whatever you wish)
for each enemy
enemy.destinationX is not -9999
.. set enemy.position( lerp(enemy.X, enemy.destinationX, dt) )
.. if enemy overlaps with object ( stone or something that should block the enemy)
OR
.. enemy.X = enemy.destinationX (if we've reached the desired oushback position)
... set enemy.destinationX -9999
Probably should have written that in a .capx instead, would have been a bit clearer.. :)
EDIT:
Heres the .capx:
Example thingy