The sentence needs a relative clause to describe the "sedimentary rock". Since oil and natural gas are obtained from the rock, the relative pronoun "which" must be preceded by the preposition "from", yielding "from which". Other options fail to provide the correct prepositional relationship or introduce unnecessary verbs.