This question has been asked previously here :
Loading a custom component into a Visualforce page dynamically
So this might (or) might not help you. I have introduced if loops but not sure if there is another way.
I am not aware of any way to dynamically construct an apex tag.
I took the approach of controlling the component to display in the controller where we have much control to do what we want.
Thanks to @sfdcfox. Based on this question I constructed the answer with a bit twist to accommodate what you are looking for:
https://developer.salesforce.com/forums?id=906F000000092Y5IAI
Page:
<apex:page controller="comp_test_controller">
<apex:dynamicComponent componentValue="{!headerComponent }"/>
</apex:page>
Controller :
public class comp_test_controller {
public transient ApexPages.Component headerComponent { get; set; }
public comp_test_controller(){
Type t = Type.forName('MyComponent');
if(t != null) {
for( ApexPages.Component cust : ((CustomComponentManager)t.newInstance()).newComponent()){
//In your case you will compare cust with the Component_Name__c value.
if(string.valueof(cust) == 'Component.sitelogin'){
this.headerComponent = cust;
}
}
}
}
}
Class to support type.forname:
Previously type.forname('') used to support components, but it supports only apex class instances now.
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_type.htm
public class MyComponent implements CustomComponentManager {
public List<ApexPages.Component> newComponent() {
List<ApexPages.Component> comp_list = new List<ApexPages.Component>();
comp_list.add(new Component.c.SiteLogin());
return comp_list;
}
}
Interface:
global interface CustomComponentManager {
List<ApexPages.Component> newComponent();
}