How to fetch posts that are stored in the different table than (default) wp_posts?

Don’t hack the Core. There are filters in WP_Query that should more than suffice to include your table, if your SQL and regex are good enough.

  • posts_distinct – Alters SQL ‘DISTINCTROW’ clause to the query that returns the post array.
  • posts_groupby – Alters SQL ‘GROUP BY’ clause of the query that returns the post array.
  • posts_join – Alters SQL ‘JOIN’ clause of the query that returns the post array.
  • post_limits – Alters SQL ‘LIMIT’ clause of the query that returns the post array.
  • posts_orderby – Alters SQL ‘ORDER BY’ clause of the query that returns the post array.
  • posts_where – Alters SQL ‘WHERE’ clause of the query that returns the post array.
  • posts_join_paged – Alters SQL paging for posts using ‘JOIN’ clause of the query that returns the post array.
  • posts_where_paged – Alters SQL paging for posts using ‘WHERE’ clause of the query that returns the post array.
  • posts_clauses – Alters all the SQL clauses above in one go. It gives you an array of elements that are easy to alter

http://codex.wordpress.org/Class_Reference/WP_Query#Filters

Your question is not detailed enough for a more detailed answer.