I have a table similar to below

**Questions table**:

```
Qid  Tags
---  ---------
1    SQL
1    DATABASE
1    ALGORITHM
2    ALGORITHM
2    TAGS
3    SQL
3    SYNTAX
3    DATABASE

```

The following 

```
SELECT * FROM Question table WHERE TAGS='SQL'

```

will display:

```
Qid  Tags
---  ----
1    SQL
2    SQL
3    SQL

```

I'm looking for a query which will display the highest related question based on similar tags.

So if I looked up Question table - `Qid=1`. The result would be Qid 3, as Qid 1 and Qid 3 have 2 similar terms, but Qid 2 only as 1 similar tag to Qid 1. If i looked up Qid 2 it would return Qid 1 as it they share 1 tag and Qid 2 and 3 share no tags. And If i looked up Qid 3 it would return Qid 1 as it as Qid 1 has 2 tags that Qid 3 has, but Qid 2 has no tags that Qid 3 has.

Thanks for any help.