Input couponcode and pick random winner

I have a database of 24000 names with personalized coupon codes with it.

These coupon codes will be printed.

I want to create a form on my website that people need to add their emailadress and their personalised couponcode.

Then it will randomly picks a winner and the price is shown if they win or not.

Any idea if this is possible with WordPress?