This is "I Speak of the Haunted House", which appeared in Tales of Suspense #42, published June, 1963. Story by Stan Lee and art by Steve Ditko.
Two friends make a bet about the existence of ghosts. One bets the other a hundred dollars he will see a ghost if he spends a night at a particular house and the other skeptical one accepts. He enters the house at night proceeds to look around areas like the basement and attic but sees nothing. Hours go by, and he is completely bored and eventually drifts off to sleep. When he wakes at dawn, he happily leaves the house to collect his hundred bucks. His friend tells him that he'd like to show him something before paying, and at first he gets mad thinking him a welcher, but when they drive back to house it is no longer there. His friend explains to his astonished convert that the house itself is the ghost appearing only one night a year for twelve hours.
Found with a search for marvel comic bet "haunted house"
Comics panels are available here, and here's the ending page as you remember.
Click the image to enlarge