Don’t execute function on specific posts

This is a logic problem primarily, but your filter is faulty as well.

Think carefully about that conditional. If any one of those values– $post->ID !== N— is true, the whole thing is true, and as a post can only have one ID for any post two of those conditions will be true. It won’t work the way you want. What you need is &&. It sounds strange, but think it through. The only way that can true is if the post ID is none of those values.

Secondly, you should always (nearly always) return content from the_content. If you don’t you effectly remove the post content.

I have rewritten this code for you:

function content_strip_img($content) {
  global $post;
  if ($post->ID !== 1 && $post->ID !== 2 && $post->ID !== 3 ) {   
    $content = preg_replace('/<img[^>]+./','', $content);
    $content="Test";
  }
  return $content;
}
add_filter('the_content', 'content_strip_img');