There is some truth to it. For example, all three of Alabama’s nitrogen executions were selected by the prisoners.
I know it’s happened a couple of times, but it’s not the usual practice. AFAIK when someone is condemned, the method of killing them is already set from the get-go.
not from the us, but afaik its generally fiction. i think most states that still do executions have a set execution method they use for everyone on death row. though i think there were a couple cases where inmates were asked; in those cases, the inmates generally choose death by firing squad
What brought it to mind was a seen in the HBO tv series OZ a while back where they asked the first female inmate to be executed this question and the warden tells her if you are hung right before you die your feet kind of do a little dance before you go and she wound up choosing that method.