Quick answer
Уда́чи!
udáchi — genitive, because it means “[I wish you] luck”
The options
Why the genitive
Wishes take the genitive because the full sentence is “I wish you [some] luck”: Жела́ю уда́чи, сча́стья, здоро́вья. The verb is usually dropped, the case stays.
The superstition you must answer correctly
Ни пу́ха ни пера́! (“neither fluff nor feather”) is said before an exam or an important event. The required answer is К чёрту! — “to the devil!”. Saying “thank you” instead is said to bring bad luck, and everyone will notice.
What you hear back
Typical mistakes
Уда́ча!
Уда́чи!
Wishes take the genitive.
Answering “спаси́бо” to ни пу́ха ни пера́
К чёрту!
The ritual answer is fixed — and Russians take it half seriously.
Check yourself
Someone says Ни пу́ха ни пера́! What do you answer?