The reason why you're getting the same record 100 times is that SELECT TOP 1 Name FROM @Titles ORDER BY NEWID()
is executed only once and then returned for each record in mycte
.
You can use a good old loop to achieve what you want. You can use that with multiple tables. It doesn't matter how many records you have in your source tables (though you should have at least 1).
declare @count int = 100
while @count > 0
begin
INSERT INTO [MyTable] ( Title )
SELECT TOP 1 Name FROM @Titles ORDER BY NEWID()
INSERT INTO [MyTable] ( Title )
SELECT TOP 1 Note FROM @Notes ORDER BY NEWID()
set @count = @count - 1
end