Activating certain window of Terminal based title


How can i activate a window name from terminal based on it’s title?

All i have so far is:

tell application “Terminal”
custom title of window 1
end tell

It should work with multiple terminal windows, but i have no idea how to loop through them, or how to “activate” any given window.

Any help appreciated.