It really depends on the store. We have 2 costcos and 3 sams within decent driving distance where I am. It really boils down to what you want. I like cosco's buyers programs (like personal check printing, digital photo development, etc) and their selection of products seem more high class. But Sams has more stores closer to me. It depends on how much you really shop and for what. Check out the stores and see which one carries the products you buy the most. You can normally get a 1 time shopping pass for free from each store.
Pick the one that suits you best. If you want later, you can still get another membership to the other place.