How would you rotate the camera when moving left or right, like Quake I movement?

and i can’t find any tutorials on how it would be done.