1. The folder in which i put all my homework got soaked.
2. The folder where I put my homework in got soaked.
3. The folder wherein I put my homework got soaked.
Only (1) is formally acceptable, and is often replaced by the less formal 'the folder I put all my homework in got soaked'.
(2) is incorrect.
(3) is grammatically correct but 130 years out of date. You will see 'wherein' almost exclusively in legal documents now.