How to index Tensor from a Tensor in a 2d index?

If I have a tensor (B,C,H,W) and a index(B,N,2) , which [:,:,0] stands for H, [:,:,1] stands for W,
how could I get the selected tensor (B,C.N) ?