Answer:
What I saw in the closet left me speechless. - subject
When I was six, I learned how to swim. - direct object
I was caught between what my conscience was telling me and what I wanted to do. - object of a preposition
The scary movie that I watched is what kept me awake all night. - predicative nominative