Over the past five years, detached homes have increased slightly more in price (on average, per year) than attached homes (townhouses, duplexes, condos).
Detached homes have increased at an average of 6.1% per year from $200K to $269K while attached homes have increased at an average of 5.2% per year from $150K to $193K.
This (detached homes increasing in value more quickly over time) wouldn't necessarily always be the case if we looked back over the past 20 years -- we could likely find time periods when this were not true -- but we have seen some larger than normal swings in home values during some of those past 20 years.
My general sense (beyond the numbers) is in line with what the graph above shows -- which is that over time (5+ years) both detached and attached homes are likely to increase in value, but detached homes are likely to increase in value a bit more quickly than attached homes.