If you use Cinemachine, you are definitely familiar with the State Driven Camera. This feature can switch virtual cameras via an Animator. For example, after creating a state driven from the Cinemachine menu, I put three virtual cameras with the following names in it and adjusted each one to the desired angles.

Cinemachine State Driven Camera Setup
At the bottom, you will see the State Driver Camera component, to activate virtual cameras, create an animator and place it in Animated Target. This camera automatically detects animator states and moves the cameras according to changing states:

I set the animator as shown below and set the names of the states as well as the parameters to make it easier.

Switching Camera Script
Finally, using the code below, refer the keys to change the parameter and you can see the change of cameras.
public Animator stateDrivenAnimator; // fill state driven animator here
public List<KeyCode> KeyCodes = new List<KeyCode>() // some keys for example
{
KeyCode.Q,
KeyCode.W,
KeyCode.E
};
public void Update()
{
KeyCodes.ForEach(k => { if (Input.GetKeyDown(k)) stateDrivenAnimator.SetTrigger(k.ToString()); });
}
Rotate clockwise and counterclockwise
For this purpose, it is better to define the camera rotation process in the Index. It is enough to define only one Index parameter instead of Triggers and condition every state by rotation cycle in order like the image.
- (N == 0)
- (NE == 1)
- (E == 2)
- (SE == 3)
- (S == 4)
- (SW == 5)
- (W == 6)
- (NW == 7)

Finally, the bottom code rotates the Index in the loop with CW and CCW keys instead of placing the key letters in the Trigger, and the cameras are set according to the Index.
public CinemachineStateDrivenCamera stateDriven; // Get state-drive here
public KeyCode CW;
public KeyCode CCW;
private int index;
public void Update()
{
if (!Input.GetKeyDown(CW) && !Input.GetKeyDown(CCW)) return;
var animator = stateDriven.m_AnimatedTarget;
var childCount = stateDriven.transform.childCount;
if (Input.GetKeyDown(CW)) index = ++index % childCount;
else if (Input.GetKeyDown(CCW)) index = (index == 0) ? childCount - 1 : --index;
animator.SetInteger("Index", index);
}