For me one of the most important thing in a book is for the writing to be addictive, engrossing, polished, decent, appealing, entertaining and witty.
In my experience, if the book fails to retain my attention and interest, and does not provide me pleasure, then usually it is not a problem with the story, but it is the way the story is written, that makes it boring.
No matter how unique the idea is, but if it's written in a dull and monotonous way then it fails to make for an enjoyable read. On the other hand, even an average story can come across as entertaining to me if the writing style is wonderful.
Also, in my opinion, characters are usually as vital as the story, as it's important to get mentally and emotionally involved not just with the story itself but also with the people living that story, and good characterisation depends on good writing skills.
Moreover, while I can usually manage to suspend belief if the storyline is somewhat flawed and unrealistic, but it's difficult not to get distracted when there are too many writing inconsistencies, continuity issues, typing errors, spelling inaccuracies and grammatical mistakes.
Of course, an ideal situation would be that both the writing and the story be excellent.
Especially, when I consider the genre of "Mystery" then I think that the story concept and the story plotting play as important role as the story execution, that is, the writing.
However, I have read several "Romance" books by various authors that contained similar story plots but the way the different authors executed, that is, wrote, the stories, made a tremendous difference in my level of enjoyment of those books.
So if I have to chose between the two, then I would have to say that it is the quality of the writing, rather than a good story, that contributes in making my overall reading experience enjoyable.