i tried with following code but i cant get the attached output
$query = db_select('webform_submitted_data', 'u');
$query->fields('u', array('sid','nid','data'));
$query->condition('nid','49','=');
$results =$query->execute();
echo "<table>";
echo "<tr>";
echo "<th>Name <th>";
echo "<th>Post <th>";
echo "</tr>";
while($record = $results->fetchAssoc())
{
$sid = $record['sid'];
$nid = $record['nid'];
$submission = webform_get_submission($nid,$sid);
echo "<tr>";
echo $submission->data[1][0];
echo $submission->data[2][0];
echo "</tr>";
}
echo "</table>";
}