Two-way tables. Relationship between variables

I need to set the relationship between factions in my game to “Friend”, “Foe”, or “Neutral”, ideally from within the editor. I think a two way table with dropdown boxes could work (if it’s possible), similar to the physics and physics2d in project settings. I can use this code for dropdowns:

enum myEnum // your custom enumeration
{
   Item1, 
   Item2, 
   Item3
};

from here:
http://answers.unity3d.com/questions/201848/how-to-create-a-drop-down-menu-in-editor.html

But how do i set the relationships between factions in editor and at runtime, and read the relationship between the factions?

Using javascript. Thanks in advance

public enum myEnum // your custom enumeration
{
Item1,
Item2,
Item3
}

var myType:myEnum;
var foe:myEnum;
var neutral:myEnum;

function CheckOther(other:myEnum){
   if(other == foe)// Attack
   if(other == neutral)// Ignore
   else // It is a friend
}

You could call the method on collision or when getting close. The object passed itself to the method so that the other can check who he is.