I'm new to DM'ing as well, so take my advice with a grain of salt. I am decidedly not an expert. With that in mind, I recommend visiting:
I don't know if it's taboo to steer people to other websites in this forum, but the above pages were invaluable to me in writing my first few campaigns. Sorry to the webmasters if that falls outside the rules.
In addition, I recently, and accidentally, stumbled across a strategy which has been, well, interesting. It'll take a little explaining. Sorry for the length of this post.
The campaign I'm running involves PCs traveling between various areas of a country. I thought it would be fun to have a handful of random encounters and skill challenges prepared that the PCs might encounter, while traveling between towns in pursuit of ________ (the main story). Here are a few examples:
The group encounters a group of young boys, on the outskirts of some town, who tied a dog to a tree and are throwing rocks at it. Does the group save the dog?
A local prostitute harasses the fanciest-dressed PC as he passes through town. How does the PC ditch her?
The locals of Town X can't offer the adventurers fresh water because their well dried up. There are skill checks to enter the well, clear the blockage, escape once the water is flowing again, etc.
My plan was to take my pre-determined ten or twelve random encounters/skill challenges, assign them to various numbers, and roll a d20 every time the PCs traveled between areas. Several numbers represented "Nothing happens." My "plan" worked differently, but even better, than I expected.
I wrote these challenges under the pretense of their being random, but, to my surprise and enjoyment, the PCs actions and interactions made it obvious which encounter or skill challenge to use as the group was traveling around.
For example, one of the PCs made a big show of his wealth shortly after arriving in one town. I quickly decided that a prostitute witnessed that exchange and inserted the "prostitute skill challenge" I had prepared.
In one story-relevant encounter, the group tried to save, intimidate, and glean information from some foe, but one of the PCs killed it, much to the consternation of the others. On their next trip between areas, I introduced the PCs to the "abused dog" skill challenge as an opportunity for the offending PC to redeem himself.
My point is, every time the group travels, I let their actions dictate whether one of my "random" encounters arises. In some cases, I've taken a basic, between-areas challenge and applied it to a battle where I wouldn't have expected it to work. I continue to add new challenges and encounters to the pool as I think of them.
If you keep these ideas vague enough, they're really pliable, and can be molded to meet almost any situation, planned or not. I don't know if what I'm describing makes sense. I hope so.
Relating it back to your campaign, you could create several haunted room scenarios and a variety of results. List them in a Word doc or whatever. When the party enters a room, you could roll to randomly decide what they encounter, and then roll again to randomly determine what happens if they succeed/fail.
If your experience is like mine, though, the choice of which "random" room to use and which "random" after-effect to apply, will become obvious, dictated by the actions and decisions of the PCs.
Best of luck in creating your campaign. I feel silly offering DM advice as a rookie DM, but I hope it helps or at least sparks an idea that you find useful.