Why this query is not showing any result on wordpresss home page?

First of all your query is wrong. The right query is

$mypost = $wpdb->query($wpdb->prepare("SELECT post_content FROM $wpdb->posts WHERE ID = %d", 2));

Second the $wpdb->query will returns an integer value indicating the number of rows affected/selected. You can check here

http://codex.wordpress.org/Class_Reference/wpdb#General_Syntax

If you want generic result you can use $wpdb->get_results

http://codex.wordpress.org/Class_Reference/wpdb#SELECT_Generic_Results

$mypost = $wpdb->get_results($wpdb->prepare("SELECT post_content FROM $wpdb->posts WHERE ID = %d", 2));

For getting single value result you can also use $wpdb->get_var

http://codex.wordpress.org/Class_Reference/wpdb#SELECT_a_Variable

$mypost = $wpdb->get_var($wpdb->prepare("SELECT post_content FROM $wpdb->posts WHERE ID = %d", 2));