Hi Mohsin,
For baselines and other custom fields you have to query respetive views for example pls look at "MSP_EpmTask_UserView". Here you'll get all your baseline data and custom fields data related to tasks.
For Resources and Proects similarly you have to query their respective views like"Msp_EpmResource_UserView" and "Msp_EpmProject_UserView"
Hope this may help you
Sachin Vashishth MCTS