If you want a really great scene like this I recommend a novel called Too Many Magicians by Randall Garrett. A man is found dead inside a locked room, at a hotel, during a convention for sorcerers. Lord Darcy, the investigator for the crown, wants to solve the crime; but his right-hand man, forensic sorcerer Master Sean O Lochlainn, was attending the convention and could be a suspect. It's fantasy but it's "grounded"... the rules for magic are well laid-out and you have a real chance to figure out what's going on. (Contrast with Harry Potter where magic can do almost anything.) The first time I read it, the reveal for who committed the murder and why just blew my mind... I had no clue, but re-reading it I delight in seeing how fair the author played with the reader. Everything Lord Darcy sees is there for the reader to see as well.
You can find the novel at used book stores, or buy the Baen book Lord Darcy which has all the Lord Darcy fiction in one volume.
Baen Books lets you read a bit of each book as a sample. Some of my favourite Lord Darcy stories are free samples: "The Eyes Have It" and "A Case of Identity" https://www.baen.com/Chapters/0743435486/0743435486.htm Please check these out and see if you enjoy them as much as I do!
P.S. There was also a good "reveal" scene at the end of Unwise Child, another Randall Garrett novel. This one is available completely free from Project Gutenberg: https://www.gutenberg.org/ebooks/23335
Because it's public domain, anyone could choose to publish an edition. A friend of mine had a paperback copy that was published under the title Starship Death.