Play animation based on what weapon I currently have in hand

How to make weapons determine what animation montage they should use?I made animation montage for punching and its working now I want that but when I equip a weapon…Can someone tell me but little more in depth?