I assume you have to wrap the result in HTML.
Like this:
<?php if ( get_post_meta( get_the_ID(), 'thumb', true ) ) : ?>
<a href="<?php the_permalink() ?>" rel="bookmark">
<img class="thumb" src="<?php echo get_post_meta( get_the_ID(), 'thumb', true ) ?>" alt="<?php the_title(); ?>" />
</a>
<?php endif; ?>
Source: https://codex.www.ads-software.com/Function_Reference/get_post_meta