The cork is given at the table to make sure it is A) wet i.e., showing it was stored properly and B) to make sure the wording on the cork matches what's on the wine bottle i.e., someone hasn't changed labels, which has been done in the past. I've never encountered this one though.
Don't sniff the cork. If the wine is "corked"/gone off, you will be able to sniff it from the glass they pour the taster and tell. A corked bottle of wine will not always show on the cork.
So...you can see if it is wet or you can feel it and then glance at the words on the cork, if there are any, that is.