I have a table like this: 

```
Name | FromPoint | TOPoint
--------------------------
A    |   0       |    2
A    |   2       |    4
B    |   2       |    4
A    |   4       |    9
B    |   5       |    6

```

How can I write a query in T-SQL to recursively join on equality the fields FromPoint and ToPoint for every combination Name/FromPoint?
An example (considering above data) of final desired result is:

```
Name  | FromPoint  | ToPoint
----------------------------
 A    |   0        |  9
 B    |   2        |  4
 B    |   5        |  6

```