try the widget logic plugin. It will work with any theme that supports widgets.
You could also write code (conditional statements ) in a text widget .
For example :
//I have not included the php-tags
$location = “http://localhost/wordpress/wp-content/uploads/2011/07/2.jpg “;
if (is_front_page() ) {
echo “<img src=’$location’ width=’200′ height=’150′ >” ;
}
// Of course a ” PHP-switch” statement is more flexible
But , you must install a plugin that allows PHP code to be executed inside a post/page/text-widget (exec-PHP) .