Notice there's no quotes around the URL variable in window.open. Also to be more concise, I've moved the var URL portion out of the if/else logic.
<script>
var URL;
if (condition) {
URL = "http://www.url.com";
} else {
URL = "http://www.url2.com"
}
</script>
<div id="Banner" data-responsive="225h" onclick="window.open(URL,'new_window');">
An even better solution would be to get rid of your inline click handlers altogether like so:
<div id="Banner" data-responsive="225h"> ... </div>
<script>
function openWindow() {
var URL;
if (condition) {
URL = "http://www.url.com";
} else {
URL = "http://www.url2.com"
}
window.open(URL,'new_window');
}
var banner = document.getElementById('Banner');
banner.addEventListener('click', openWindow, false); //using addEventListener for brevity
</script>