Roleplaying Games are actually defined differently within the videogames industry than within the wider gaming industry. A Roleplaying Game within the wider gaming industry is like Dungeons and Dragons, and similar, which involves players creating their own characters and then improvising their own stories.
Roleplaying Games in video games often using the mechanics systems from roleplaying games, but very rarely actually involve any roleplaying at all. This is because, on one hand, quite a few video games provide characters where you play a role, thus rendering roleplaying moot - whether you are Mario, Gordon Freeman, Link, or whatever, you are presumed to be playing a role, and thus roleplaying. Yet, in reality, these are better defined by the genre of their gameplay, which is often platformer, first person shooter, and action-adventure respectively. The other reason is that most of these games enforce a story on the player through a distinct narrative, with very little choice and freedom. There's no question the Mario, Gordon Freeman, or Link won't follow the story in the game, because that's the game - if you didn't want to follow the story, you might as well play another game.
Yet, roleplaying includes the freedom to create a character and make choices that are important, and thus direct how the adventure turns out. This is easier said than done, but a few games manage this - but even then, they still have limits to what is actually encoded within the the game itself. You cannot play a mage in a game where there isn't any code for magic, for example, although in a tabletop RPG, this is indeed possible if the GM allows it, and is the nature of the true roleplaying game - although trying to justify exactly why your character is able to discover and use magic is an adventure in itself.
In general, there are very few real computer roleplaying games, without having to change the definition of what a roleplaying game is. Ask anyone who comes from the roleplaying game hobby and/or industry, and they'll tell you this. If you learn roleplaying from video games - which is now a common method - you'll find that you'll have to relearn everything because video games themselves use every bad practice in the book with their own idea of roleplaying.
I am somewhat of an expert on this, as the lead of the Legend of Zelda Roleplaying Game (www.legendofzeldarpg.com) which has spent the past ten years turning the franchise into a Dungeons and Dragons-like roleplaying game, and you can see where the narrative cracks are. The storylines of the games themselves are extremely simplistic and bland, and the limitations within them are often limitations due to technology, and flawed assumptions by the designers. In short, they clearly weren't designed as a roleplaying game adventure - it was designed as a video game story.
The only ones that stand up any where close to such scrutiny are true RPGs, typically because they are designed as roleplaying games. They use roleplaying game systems, roleplaying game practices, and roleplaying game concepts. Although even then, they often have their limits, because they can only include what is scripted, and everything has to be top heavy. Freedom has some very undesirable traits - for example, being able to kill key NPCs. In an RPG, it's fairly easy for the GM to create a new NPC or shift their role to another existing NPC that is appropriate, or build a new adventure on the basis of that. If the PCs dick around in one area, they can move onto the next and need never return. In a CRPG, it's not so easy, and killing key NPCs can break the game, and dicking around in an area can result in making the game unplayable, simply because there are only so many areas to go to.
Ultimately, roleplaying in computer games means that you can play the game in a variety of ways, even though this is not the same definition that roleplaying has elsewhere in gaming. There's more to roleplaying than character customisation - it needs to also include meaningful choice on the story. Choosing whether to kill via magic, archery, or swords is not roleplaying as in the rest of gaming.
In fact, this is pretty much an insult, and it's pretty much the misunderstanding of what roleplaying is that has led to the current issues within the roleplaying games industry today, as many are coming from the video games genre, and trying to adopt video games models for roleplaying, and many roleplayers just aren't buying it. Only those newcomers who think roleplaying should be like World of Warcraft, Diablo, Two Worlds, and Dragon Age seem to be obsessing about making it such.