$sql = 'SELECT * FROM message WHERE canal="$namechat" AND private="1"';
$sql = 'SELECT * FROM message WHERE (canal="hibye" OR canal="byehi") AND private="1"';
$message = ... // выполнить запрос
if ("hibye" == $message["canal"])
{
//...
header('Location: page1.php');
die();
}
else if ("byehi" == $message["canal"])
{
//...
header('Location: page2.php');
die();
}