Different roles depending on a user's field
You should be able to do this with a custom module and without roles. There is plenty of documentation around for creating custom modules, so I will not go into those details.

In your .module file, make use of hook_node_access:

function MODULENAME_node_access($node, $op, $account) {
  $type = is_string($node) ? $node : $node-&gt;type;

  // Only work on edits.
  if ($type == 'contry_content_type' &amp;&amp; $op == 'edit') {
    // Field get items returns an array.
    $user_countries = field_get_items('user', $account, 'country_field_name');
    $content_countries = field_get_items('node', $node, 'node_country_field_name');

    if ($user_countries[0] == content_countries[0]) {
        return NODE_ACCESS_ALLOW;
    }
  }

  // Returning nothing from this function would have the same effect.
  return NODE_ACCESS_IGNORE;
}