Why does my bike make noise in certain gears?
As per the answer by @ian above, not all combinations are viable. Generally speaking you are advised to not use large - large and small - small combinations.

When using both large rings you risk the chain rubbing on the front derailleur and the rear one could be pulled tight enough to cause some catching too.

When on both small rings the rear derailleur can fold right back and cause the to jockey wheel to catch on the chain as it runs underneath.

It's a dark art but check the angle of the front derailleur. If it's fish-tailing out then it could do with some re-aligning. The height above the chain ring could also cause a bit of an issue if it's too high.