If your character is moving using physics, you can simply apply an upward force when the character collides with the enemy.
If you're using more manual movement, then make sure you have a variable representing upward movement that decreases over time as long as it is above 0. Factor that into your movement code.