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