[ask] How to show a specific banner in a specific post?

On my blog I have 4 category and in each category 3 posts.How can I display a specific banner for "category 1" on all posts in that category,another banner for "category 2" to all my posts in that category and so on?I want to do this for the banner in the header and for the onde in sidebar.I managed to show a specific banner in every category with the code below ..but when i go to any post in that category i get the general banner.

Note that adblockers might block our captcha, and other functionality on BHW so if you don't see the captcha or see reduced functionality please disable adblockers to ensure full functionality, note we only allow relevant management verified ads on BHW.