Ok, so here's one that has me thinking at the moment, I thought I'd share and see if you guys had any good ideas...
CREATE TABLE #temp (
[ID] [int] NOT NULL PRIMARY KEY CLUSTERED
)
INSERT INTO [#temp] ([ID]) VALUES (1)
INSERT INTO [#temp] ([ID]) VALUES (2)
INSERT INTO [#temp] ([ID]) VALUES (3)
INSERT INTO [#temp] ([ID]) VALUES (4)
SELECT [t1].[ID] AS Value1,
[t2].[ID] AS Value2,
[t3].[ID] AS Value3,
[t4].[ID] AS Value4
FROM #temp t1 INNER JOIN
#temp t2 ON [t2].[ID] != [t1].[ID] INNER JOIN
#temp t3 ON [t3].[ID] != [t1].[ID] AND [t3].[ID] != [t2].[ID] INNER JOIN
#temp t4 ON [t4].[ID] != [t1].[ID] AND [t4].[ID] != [t2].[ID] AND [t4].[ID] != [t3].[ID]
ORDER BY [t1].[ID], [t2].[ID], [t3].[ID], [t4].[ID]
The code above works out the permutations for the set (1, 2, 3, 4) - i.e. it returns a result set which contains all possible orderings of those four values. However, it's pretty inflexible - it doesn't support any number other than 4 elements, and it doesn't support asking for the number of possible sub-sets (i.e. how many different permutations of three numbers from 4 sets are there).
So - any thoughts on how this might be best achieved?