Да хоть 100500 штук - скрипт один и тот же.
<div>
<button value='i1'>Button1</button>
<button value='i2'>Button2</button>
<button value='i3'>Button3</button>
<div id='i1' class='cont' style='display:none'>Content 1</div>
<div id='i2' class='cont' style='display:none'>Content 2</div>
<div id='i3' class='cont' style='display:none'>Content 3</div>
</div>
<script>
[].forEach.call(document.querySelectorAll('button'), function(item) {
item.onclick = function() {
[].forEach.call(document.querySelectorAll('.cont'), function(el) {
el.id == item.value ? el.style.display = 'flex': el.style.display = 'none';
})
}
});
</script>