You can do it by adding some code or by installing a plugin.
You can add the following code inside your loop:
if (in_category('news')) {
get_header('news');
} else {
get_header();
}
This code checks if the current post belongs to a category that’s called news, and if that’s true, then it will use header-news.php instead of header.php.
You will have to create header-news.php inside your theme and add your custom header image in it.
Or you can install the following plugin which allows you to add a custom header to pages, posts, categories, or tags: