Using either of the following should work for you then. If the current post id is not 8 then print out "Not post 8". You can add an else statement if you want something else printed.
<?php
$post_id = get_the_ID();
if ($post_id != "8") {
echo "Not post 8";
}
?>
<?php
$post_id = get_the_ID();
if ($post_id != 8) {
echo "Not post 8";
}
?>