You can get the user submitted value by $_POST['value']. Here value refers to the name of the form element. Then compare it with the corresponding database element. If a match is found then increment the count by one.
$query="SELECT answer FROM table_name";//select appropriates filed names in the database