tu vorresti che la query cerchi
datacont and cpt
oppure
datacont and cpt1
oppure datacont and cpt2?
se è cosi prova a mettere le parentesi in questo modo
$sql1 = "SELECT * FROM `cont` where datacont ='$dat'
and
(cpt = '$cpt'
or cpt1 = '$cpt' or cpt2 = '$cpt' )";