My friend said to me: "Where were you yesterday?"
My friend said to me where was I yesterday.
My friend asked me where I was yesterday.
My friend said to me where I was the day before.
My friend asked me where I had been the day before.