How did the story end?

Literal

Story [possessive-の] ending [topic-は] how was?

結末はどうでしたか is a polite question about outcome. どう means 'how' and でしたか is past polite copula. A natural question after someone finishes telling a story.