Open the console by pressing the tilde key (usually found directly under the escape button), enter that command with the relevant quest ID, and it will reset that quest.
If you're playing on PC and don't want to/cannot simply reload an old save (Which is always the safest option) you can use this console command to reset that quest.