As @EikePierstoff and @Kao have both mentioned, this is almost certainly "The Store of the Worlds" by Robert Sheckley and collected in his short-fiction anthology of the same name
You can read (some of it) online here;
Mr. Wayne came to the end of the long, shoulder-high mound of grey
rubble, and there was the Store of the Worlds. It was exactly as his
friends had described: a small shack constructed of bits of lumber,
parts of cars, a piece of galvanised iron and a few rows of crumbling
bricks, all daubed over with a watery blue paint.
“I’ve heard about your store from friends,” Mr. Wayne said. “Then you
know my price,” Tompkins said. “Have you brought it?” “Yes,” said Mr.
Wayne, holding up his parcel. “But I want to ask first –” “They
always want to ask,” Tompkins said to the parrot, who blinked. “Go
ahead, ask.” “I want to know what really happens.” Tompkins sighed.
“What happens is this. You pay me my fee. I give you an injection
which knocks you out. Then, with the aid of certain gadgets which I
have in the back of the store, I liberate your mind.”
“Your mind, liberated from its body, is able to choose from the
countless probability-worlds which the Earth casts off in every second
of its existence.”
The device is able to transfer the mind to an alternate reality for precisely one year, at the cost of ten years of the user's life.
If you have been harbouring a secret dream of murder –” “Oh hardly, hardly!” cried Mr. Wayne. “– then you will go to a world where you can
murder, where you can roll in blood, where you can outdo de Sade or
Caesar, or whoever your idol may be. Suppose it’s power you want?
Then you’ll choose a world where you are a god, literally and
actually. A bloodthirsty Juggernaut, perhaps, or an all-wise Buddha.”
“I doubt very much if I –” “There are other desires, too,” Tompkins
said. “All heavens and all hells. Unbridled sexuality. Gluttony,
drunkenness, love, fame – anything you want.”